<template>

  <div id="userLayout" :class="['user-layout-wrapper', isMobile && 'mobile']">
    <div class="container">
      <div class="js_sign-top"></div>
      <div class="js_sign-bottom"></div>
      <!-- <div class="user-layout-lang">
        <select-lang class="select-lang-trigger" />
      </div> -->
      <div class="user-layout-content">
        <div class="user__container">
          <div class="user__left">
            <!-- <div class="header">
              <a href="/">
                <span class="logo"></span>捷讼
              </a>
            </div> -->
          </div>
          <div class="user__right">
            <div class="top">
              <div class="header">
                <span class="title">材料清洗工具</span>
              </div>
              <div class="desc">
                {{ $t('layouts.userLayout.title') }}
              </div>
            </div>

            <router-view />
          </div>
        </div>
        <div class="footer">
          <!-- <div class="links">
            <a href="_self">帮助</a>
            <a href="_self">隐私</a>
            <a href="_self">条款</a>
          </div> -->
          <div class="copyright">
            <a href="https://beian.miit.gov.cn" target="_blank">鄂ICP备18021267号</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { deviceMixin } from '@/store/device-mixin'
import SelectLang from '@/components/SelectLang'
import defaultSettings from '@/config/defaultSettings'
export default {
  name: 'UserLayout',
  components: {
    SelectLang
  },
  mixins: [deviceMixin],
  data () {
    return {
      title: defaultSettings.title
    }
  },
  computed: {

  },
  mounted () {
    document.body.classList.add('userLayout')
  },
  beforeDestroy () {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang="less" scoped>
#userLayout.user-layout-wrapper {
  height: 100%;

  &.mobile {
    .container {
      .main {
        max-width: 368px;
        width: 98%;
      }
    }
  }

  .container {
    width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    // background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
    // background-size: 100%;
    //padding: 50px 0 84px;
    background: linear-gradient(313deg, #2F54EB 0%, #0D85F4 100%);
    position: relative;

    .js_sign-top {
      position: absolute;
      top: 0;
      right: 0;
      height: 438px;
      width: 595px;
      background: url(~@/assets/js_sign_02.png) no-repeat;
      background-size: cover;
    }

    .js_sign-bottom {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 394px;
      width: 561px;
      background: url(~@/assets/js_sign_01.png) no-repeat;
      background-size: cover;
    }

    .user-layout-lang {
      width: 100%;
      height: 40px;
      line-height: 44px;
      text-align: right;

      .select-lang-trigger {
        cursor: pointer;
        padding: 12px;
        margin-right: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        vertical-align: middle;
      }
    }

    .user-layout-content {
      position: relative;
      display: flex;
      flex-direction: column;
      width: 1100px;
      height: 640px;
      z-index: 1000;

      .user__container {
        display: flex;
      }

      .user__left {
        width: 550px;
        height: 640px;
        border-radius: 4px 0px 0px 4px;
        background: url(~@/assets/js_sign_03.gif) no-repeat;
        background-size: cover;
      }

      .user__right {
        width: 550px;
        height: 640px;
        background: #FFFFFF;
        border-radius: 0px 4px 4px 0px;
      }

      .top {
        width: 368px;
        margin: 112px auto 0;
        .desc {
          font-size: 14px;
          color: #666;
          margin-top: 16px;
          margin-bottom: 50px;
        }
      }

      .header {
        line-height: 1;

        a {
          display: inline-flex;
          align-items: center;
          font-size: 26px;
          color: #2F54EB;
        }

        .logo {
          height: 44px;
          width: 44px;
          margin-right: 8px;
          background: url(~@/assets/logo.svg) no-repeat;
          background-size: cover;
        }

        .title {
          font-size: 24px;
          color: #333;
          font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
          font-weight: 600;
        }

        .subtitle {
          font-size: 24px;
          font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
          font-weight: 600;
          color: #2f54eb;
        }
      }

      .main {
        min-width: 260px;
        width: 368px;
        margin: 0 auto;
      }

      .footer {
        // position: absolute;
        width: 100%;
        bottom: 0;
        padding: 0 16px;
        margin: 32px 0 24px;
        text-align: center;

        .links {
          margin-bottom: 8px;
          font-size: 14px;
          a {
            color: #fff;
            transition: all 0.3s;
            &:not(:last-child) {
              margin-right: 40px;
            }
          }
        }
        .copyright {
          a {
            color: #fff;
            font-size: 14px;
          }

        }
      }
    }

    a {
      text-decoration: none;
    }

  }
}
</style>
